﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AddInvoiceInfo.aspx.cs" Inherits="ZX.WebApp.Crm.Modules.AddInvoiceInfo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/connection/connection-min.js"></script>
    <script src="../../Scripts/jquery-1.6.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.json-2.2.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.calendar.js" type="text/javascript"></script>
    <script src="../../Scripts/Jquery.form.js" type="text/javascript"></script>
    <link href="../../Styles/default/calendar.css" rel="stylesheet" type="text/css" />
    <link href="../../Styles/extendTable.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div id="content">
                
        <table class="table1" id="invoince">
            <tr>
                <th>发票号
                </th>
                <td>
                <input type="text" id="txtInvoince" style="width: 150px;" runat="server" title="有多个发票的可输入:88888888;88888889"
                                onkeyup="this.value=this.value.replace(/[^\d\;]/g,'')" onafterpaste="this.value=this.value.replace(/[^\d\;]/g,'')"/> 
                </td>
            </tr>
            <tr>
                <th>收据号
                </th>
                <td><input type="text" id="txtReceipt" style="width: 150px;" runat="server" title="有多个发票的可输入:88888888;88888889" onkeyup="this.value=this.value.replace(/[^\d\;]/g,'')"
                                onafterpaste="this.value=this.value.replace(/[^\d\;]/g,'')"/> 
                </td>
            </tr>
            <tr>
                <th>发票总金额
                </th>
                <td><input type="text" id="txtMoney" style="width: 150px;" runat="server" onkeyup="this.value=this.value.replace(/[^\d]/g,'')"
                                onafterpaste="this.value=this.value.replace(/[^\d]/g,'')"/> 
                </td>
            </tr>
            <tr>
                <th>快递号
                </th>
                <td><input type="text" id="ExpressNo" style="width: 150px;" runat="server" /> 
                </td>
            </tr>
        </table>
        <table class="table1" id="checkPay">
                    <tr>
                        <th style="width:62%">
                            <span style="color: Red">*</span>是否15个月内成交
                        </th><td>
                        <asp:DropDownList ID="ddlIsFifteenMonth" runat="server" Width="135px">
                            <asp:ListItem Value="">--请选择--</asp:ListItem>
                            <asp:ListItem Selected="True"  Value="0">否</asp:ListItem>
                            <asp:ListItem Value="1">是</asp:ListItem>
                            <asp:ListItem Value="2">不确定</asp:ListItem>
                        </asp:DropDownList></td></tr><tr>
                        <th>
                            <span style="color: Red">*</span>是否项目结项6个月内续签（不包含产品类、俱乐部）
                        </th><td>
                        <asp:DropDownList ID="ddlIsProjectOver" runat="server" Width="135px">
                            <asp:ListItem Value="">--请选择--</asp:ListItem>
                            <asp:ListItem Selected="True"  Value="0">否</asp:ListItem>
                            <asp:ListItem Value="1">是</asp:ListItem>
                            <asp:ListItem Value="2">不确定</asp:ListItem>
                        </asp:DropDownList></td></tr><tr>
                        <th>
                            <span style="color: Red">*</span>是否总裁内训
                        </th><td>
                        <asp:DropDownList ID="ddlIsCEOInnerTrain" runat="server" Width="135px">
                            <asp:ListItem Value="">--请选择--</asp:ListItem>
                            <asp:ListItem Selected="True" Value="0">否</asp:ListItem>
                            <asp:ListItem Value="1">是</asp:ListItem>
                            <asp:ListItem Value="2">不确定</asp:ListItem>
                        </asp:DropDownList></td>
                </tr><tr>
                        <th>
                            <span style="color: Red">*</span>是否内训中续签内训
                        </th><td>
                        <asp:DropDownList ID="ddlIsInnerTrainSian" runat="server" Width="135px">
                            <asp:ListItem Value="">--请选择--</asp:ListItem>
                            <asp:ListItem Selected="True" Value="0">否</asp:ListItem>
                            <asp:ListItem Value="1">是</asp:ListItem>
                            <asp:ListItem Value="2">不确定</asp:ListItem>
                        </asp:DropDownList></td></tr><tr>
                        <th>
                            <span style="color: Red">*</span>是否一推现场或4个月内完款
                        </th><td>
                        <asp:DropDownList ID="ddlIsFisrtSale" runat="server" Width="135px">
                            <asp:ListItem Value="">--请选择--</asp:ListItem>
                            <asp:ListItem Selected="True" Value="0">否</asp:ListItem>
                            <asp:ListItem Value="1">是</asp:ListItem>
                            <asp:ListItem Value="2">不确定</asp:ListItem>
                        </asp:DropDownList></td>
                </tr>
                    <tr><th><span style="color: Red">*</span>是否鹰计划续签</th>
                    <td>
                    <asp:DropDownList ID="ddlEP" runat="server" Width="135px">
                            <asp:ListItem Value="">--请选择--</asp:ListItem>
                            <asp:ListItem Selected="True" Value="0">否</asp:ListItem>
                            <asp:ListItem Value="1">是</asp:ListItem>
                            <asp:ListItem Value="2">不确定</asp:ListItem>
                     </asp:DropDownList></td>
                     </tr>
                      <tr><th><span style="color: Red">*</span>具体鹰计划</th><td><asp:DropDownList ID="ddlDetailsPE" AppendDataBoundItems="true" runat="server" Width="135px">
                            <asp:ListItem Value="00000000-0000-0000-0000-000000000000">--请选择--</asp:ListItem>
                            <asp:ListItem Value="00000000-0000-0000-0000-000000000000">无</asp:ListItem>

                        </asp:DropDownList>
                     
                        </td></tr>
                         <tr><th><span style="color: Red">*</span>是否独立业绩</th><td><asp:DropDownList ID="ddlSelfhelp" onchange="showYear('ddlSelfhelp','spYear')" runat="server" Width="135px">
                            <asp:ListItem Value="">--请选择--</asp:ListItem>
                            <asp:ListItem Value="0">否</asp:ListItem>
                            <asp:ListItem Selected="True" Value="1">是</asp:ListItem>
                            <asp:ListItem Value="2">不确定</asp:ListItem>
                        </asp:DropDownList><span id="spYear" style="display:none">
                        <asp:DropDownList ID="ddlYear" AppendDataBoundItems="true" runat="server">
                            <asp:ListItem Value="">--请选择年份--</asp:ListItem>
                    </asp:DropDownList></span>
                        </td></tr> 
                     <tr>
                     <th>
                            <span style="color: Red">*</span>是否算业绩
                        </th>
                        <td>
                        <asp:DropDownList ID="ddlIsYj" runat="server" Width="135px">
                            <asp:ListItem Value="">--请选择--</asp:ListItem>
                            <asp:ListItem Value="0">否</asp:ListItem>
                            <asp:ListItem Value="1" Selected="True">是</asp:ListItem>
                            <asp:ListItem Value="2">不确定</asp:ListItem>
                        </asp:DropDownList></td>
                     </tr>  
                        <tr><th>课程成交期数</th><td>
                        <asp:Label ID="lblCourse" runat="server" Text=""></asp:Label></td></tr><tr><th>客户来源</th><td>&nbsp;
                        <asp:Label ID="lblDev" runat="server" Text="自主开发"></asp:Label></td></tr>
                </table>
    </div>
    </form>
</body>
<script type="text/javascript">
    var Entity = "CrmPayInvoice", StrId = "<%=StrId %>",StrOrderId="<%=StrOrderId %>",
        Url = "";

    function showYear(dllObj,spObj) {
        if ($("#" + dllObj).val() == "1") {
            $("#" + spObj).attr('style', 'display:');
        } else {
            $("#" + spObj).attr('style', 'display:none');
        }
    }
    function Save() {
        var vInvoince = $("#txtInvoince").val();
        var vReceipt = $("#txtReceipt").val();
        var vMoney = $("#txtMoney").val();
        var vExpressNo = $("#ExpressNo").val();
        if (getPar1("view") == "check") {
            Url = "../../EditWidows/OrganizationalManager/DataProcessin.aspx?entity=" + Entity + "&view=check&ID=" + StrId + "&action=Update&IsFifteenMonth=" + $("#ddlIsFifteenMonth").val() + "&IsProjectOver=" + $("#ddlIsProjectOver").val() + "&IsCEOInnerTrain=" + $("#ddlIsCEOInnerTrain").val() + "&IsInnerTrainSian=" + $("#ddlIsInnerTrainSian").val() + "&IsFisrtSale=" + $("#ddlIsFisrtSale").val() + "&IsSelfHelp=" + $("#ddlSelfhelp").val() + "&SelfHelpYear=" + $("#ddlYear").val() + "&IsPEContinu=" + $("#ddlEP").val() + "&PackID=" + $("#ddlDetailsPE").val() + "&OrderID=" + StrOrderId;
        } else {

            Url = "../../EditWidows/OrganizationalManager/DataProcessin.aspx?entity=" + Entity + "&ID=" + StrId + "&action=Update&Invoince=" + vInvoince + "&ExpressNo=" + vExpressNo + "&Receipt=" + vReceipt + "&InvoiceMoney=" + vMoney;
        } SaveData();
        
    }
    function SaveData() {
        YAHOO.util.Connect.asyncRequest('POST', Url, {
            success: function (res) {
                var inventory;
                try {
                    inventory = res.responseText;
                    if (inventory == 1) {
                        alert("操作成功!");
                        parent.closeWin();
                    } else {
                        alert(inventory);
                    }
                }
                catch (e) {
                }
                finally {
                }
            },
            failure: function (error) {
                alert("数据错误：" + error.statusText);
            }
        }, null);
    }
    $(document).ready(function () {
        $('#CommissionTime').cld();
        if($("#ddlSelfhelp").val()=="1"){
            $("#spYear").attr('style', 'display:');
        }
        if (getPar1("view") == "check") {
            $("#invoince").attr('style', 'display:none');
        } else {
            $("#checkPay").attr('style', 'display:none');
        }
    });
</script>
</html>
